﻿using FlowerModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using FlowerDAL;
namespace FlowerBLL
{
    public class UsersBLL
    {
        #region 注册
        /// <summary>
        /// 注册方法
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="t"></param>
        /// <returns></returns>
        public int Register<T>(T t)
        {
            return BllFactory.NewUsersDAL().Register<T>(t);
        }
        #endregion

        #region 登录
        /// <summary>
        /// 登录方法
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="name"></param>
        /// <param name="pwd"></param>
        /// <returns></returns>
        public T Login<T>(string phone, string pwd)
        {
            return BllFactory.NewUsersDAL().Login<T>(phone, pwd);
        }
        #endregion

        #region 判断手机号

        /// <summary>
        /// 判断手机号是否存在
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="phone"></param>
        /// <returns></returns>
        public int IsPhone<T>(string phone)
        {
            return BllFactory.NewUsersDAL().IsPhone<T>(phone);
        }
        #endregion
       
    }
}
